package gui;

import java.awt.Dimension;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.JFrame;

public class CenteredFrame extends JFrame{
	public CenteredFrame(){
		Toolkit kit=Toolkit.getDefaultToolkit();
		Dimension screenSize=kit.getScreenSize();
		int screenHeight=screenSize.height;
		int screenWidth=screenSize.width;
		
		setSize(screenWidth/3,screenWidth/4);
		//setLocation(0,0);
		
		Image img=kit.getImage("icon.gif");
		setIconImage(img);
		setTitle("主窗口");
		//this.setResizable(false);
	}
}
